# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 118
n 118(None)[self.text_sel.set_scroll(selected)
return None
]:
	i: 70(f), 107()
	o: 

nname: 107
n 107(None)[]:
	i: 70(t)
	o: 118()

nname: 70
n 70(selected)[UIItem.reset(self, item, selected, position)
]:
	i: 12(), 41()
	o: 107(t), 118(f)

nname: 41
n 41(None)[self._item_name = None
self.widget.set_color(a=0)
]:
	i: 0(f)
	o: 70()

nname: 12
n 12(None)[self._item_name = item.name
self._update_text(position)
]:
	i: 0(t)
	o: 70()

nname: 0
n 0(item is not None)[]:
	i: 
	o: 12(t), 41(f)

nname: 118
n 118(None)[self.text_sel.set_scroll(selected)
return None
]:
	i: 0(f)
	o: 

nname: 0
n 0(None)[if item is not None:
	self._item_name = item.name
	self._update_text(position)
else:
	self._item_name = None
	self.widget.set_color(a=0)
UIItem.reset(self, item, selected, position)
if selected:
	pass
]:
	i: 
	o: 118()

nname: 0
n 0(None)[if item is not None:
	self._item_name = item.name
	self._update_text(position)
else:
	self._item_name = None
	self.widget.set_color(a=0)
UIItem.reset(self, item, selected, position)
if selected:
	pass
self.text_sel.set_scroll(selected)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb758bd0c>}
nname: 62
n 62(None)[return None
]:
	i: 40(JA), 57(), 61()
	o: 

nname: 61
n 61(None)[]:
	i: 0(f)
	o: 62()

nname: 57
n 57(None)[]:
	i: 15(f)
	o: 62()

nname: 40
n 40(None)[self._update_text(position)
]:
	i: 15(t)
	o: 62(JA)

nname: 15
n 15(self._item_name is not None)[self._position = position
]:
	i: 0(t)
	o: 40(t), 57(f)

nname: 0
n 0(position != self._position)[]:
	i: 
	o: 15(t), 61(f)

nname: 0
n 0(None)[if position != self._position:
	self._position = position
	if self._item_name is not None:
		self._update_text(position)
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb758b32c>}
nname: 161
n 161(None)[return None
]:
	i: 68(), 104(), 160(AE)
	o: 

nname: 104
n 104(None)[name = name.encode('ascii', 'replace')
self._selected_widget.set_text(name)
self._not_selected_widget.set_text(name)
]:
	i: 65(except)
	o: 161()

nname: 68
n 68(None)[self._selected_widget.set_text(name)
self._not_selected_widget.set_text(name)
]:
	i: 65(try)
	o: 161()

nname: 65
n 65(None)[]:
	i: 26(), 49()
	o: 68(try), 104(except)

nname: 49
n 49(None)[name = omnicode(self._item_name)
]:
	i: 0&12(f)
	o: 65()

nname: 26
n 26(None)[name = '%d. %s' % (position, self._item_name)
]:
	i: 0&12(t)
	o: 65()

nname: 0&12
n 0&12(position is not None and self.style['enumerated'])[]:
	i: 
	o: 26(t), 49(f)

nname: 104
n 104(None)[except:
	name = name.encode('ascii', 'replace')
	self._selected_widget.set_text(name)
	self._not_selected_widget.set_text(name)
return None
]:
	i: 0&12()
	o: 

nname: 0&12
n 0&12(None)[if position is not None and self.style['enumerated']:
	name = '%d. %s' % (position, self._item_name)
else:
	name = omnicode(self._item_name)
try:
	self._selected_widget.set_text(name)
	self._not_selected_widget.set_text(name)
]:
	i: 
	o: 104()

nname: 0&12
n 0&12(None)[if position is not None and self.style['enumerated']:
	name = '%d. %s' % (position, self._item_name)
else:
	name = omnicode(self._item_name)
try:
	self._selected_widget.set_text(name)
	self._not_selected_widget.set_text(name)
except:
	name = name.encode('ascii', 'replace')
	self._selected_widget.set_text(name)
	self._not_selected_widget.set_text(name)
return None
]:
	i: 
	o: 

self.nodes: {'0&12': <unpyclib.structure.node instance at 0xb758be4c>}
nname: 0
n 0(None)[self._item_name = None
style = self.style
maxlen = style['maxlen']
text = TextBlock(max_width=maxlen)
text.set_color(color=style['text_color'])
text_size = style['text_size']
self._not_selected_kwargs.update(width=text_size[0], height=text_size[1])
text_selected = TextBlock(max_width=maxlen)
text_selected.set_color(color=style['selected_text_color'])
text_size = style['selected_text_size']
self._selected_kwargs.update(width=text_size[0], height=text_size[1])
text_selected.set_style(style=style['selected_font_style'])
text.set_style(style=style['font_style'])
self.text_not_sel = text
self.text_sel = text_selected
return (text, text_selected)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb758bacc>}
nname: 48
n 48(None)[self.text_sel.set_scroll(selected)
]:
	i: 0(f), 37()
	o: 

nname: 37
n 37(None)[]:
	i: 0(t)
	o: 48()

nname: 0
n 0(selected)[UIItem._set_selected(self, selected, *args, **kw)
]:
	i: 
	o: 37(t), 48(f)

nname: 0
n 0(None)[UIItem._set_selected(self, selected, *args, **kw)
if selected:
	pass
self.text_sel.set_scroll(selected)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb758b18c>}
nname: 0
n 0(None)[self._item_name = None
self.text_sel.set_text('')
self.text_not_sel.set_text('')
self.text_sel.set_scroll(False)
return UIItem.destroy(self)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb758bf4c>}
nname: 6
n 6(None)[__slots__ = ['_selected', '_marked', '_position', '_edited', 'widget', 'style', '_item_name', '_not_selected_widget', '_selected_widget', 'text_not_sel', 'text_sel', 'selected_style_string', 'not_selected_style_string']
def reset(self, item, selected, position=None):
	if item is not None:
		self._item_name = item.name
		self._update_text(position)
	else:
		self._item_name = None
		self.widget.set_color(a=0)
	UIItem.reset(self, item, selected, position)
	if selected:
		pass
	self.text_sel.set_scroll(selected)
	return None

def set_position(self, position):
	if position != self._position:
		self._position = position
		if self._item_name is not None:
			self._update_text(position)
	return None

def _update_text(self, position):
	if position is not None and self.style['enumerated']:
		name = '%d. %s' % (position, self._item_name)
	else:
		name = omnicode(self._item_name)
	try:
		self._selected_widget.set_text(name)
		self._not_selected_widget.set_text(name)
	except:
		name = name.encode('ascii', 'replace')
		self._selected_widget.set_text(name)
		self._not_selected_widget.set_text(name)
	return None

def _create(self):
	self._item_name = None
	style = self.style
	maxlen = style['maxlen']
	text = TextBlock(max_width=maxlen)
	text.set_color(color=style['text_color'])
	text_size = style['text_size']
	self._not_selected_kwargs.update(width=text_size[0], height=text_size[1])
	text_selected = TextBlock(max_width=maxlen)
	text_selected.set_color(color=style['selected_text_color'])
	text_size = style['selected_text_size']
	self._selected_kwargs.update(width=text_size[0], height=text_size[1])
	text_selected.set_style(style=style['selected_font_style'])
	text.set_style(style=style['font_style'])
	self.text_not_sel = text
	self.text_sel = text_selected
	return (text, text_selected)

def _set_selected(self, selected, *args, **args):
	UIItem._set_selected(self, selected, *args, **kw)
	if selected:
		pass
	self.text_sel.set_scroll(selected)

def destroy(self):
	self._item_name = None
	self.text_sel.set_text('')
	self.text_not_sel.set_text('')
	self.text_sel.set_scroll(False)
	return UIItem.destroy(self)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7587ccc>}
nname: 145
n 145(None)[class TextItem(UIItem):
	__slots__ = ['_selected', '_marked', '_position', '_edited', 'widget', 'style', '_item_name', '_not_selected_widget', '_selected_widget', 'text_not_sel', 'text_sel', 'selected_style_string', 'not_selected_style_string']
	def reset(self, item, selected, position=None):
		if item is not None:
			self._item_name = item.name
			self._update_text(position)
		else:
			self._item_name = None
			self.widget.set_color(a=0)
		UIItem.reset(self, item, selected, position)
		if selected:
			pass
		self.text_sel.set_scroll(selected)
		return None

	def set_position(self, position):
		if position != self._position:
			self._position = position
			if self._item_name is not None:
				self._update_text(position)
		return None

	def _update_text(self, position):
		if position is not None and self.style['enumerated']:
			name = '%d. %s' % (position, self._item_name)
		else:
			name = omnicode(self._item_name)
		try:
			self._selected_widget.set_text(name)
			self._not_selected_widget.set_text(name)
		except:
			name = name.encode('ascii', 'replace')
			self._selected_widget.set_text(name)
			self._not_selected_widget.set_text(name)
		return None

	def _create(self):
		self._item_name = None
		style = self.style
		maxlen = style['maxlen']
		text = TextBlock(max_width=maxlen)
		text.set_color(color=style['text_color'])
		text_size = style['text_size']
		self._not_selected_kwargs.update(width=text_size[0], height=text_size[1])
		text_selected = TextBlock(max_width=maxlen)
		text_selected.set_color(color=style['selected_text_color'])
		text_size = style['selected_text_size']
		self._selected_kwargs.update(width=text_size[0], height=text_size[1])
		text_selected.set_style(style=style['selected_font_style'])
		text.set_style(style=style['font_style'])
		self.text_not_sel = text
		self.text_sel = text_selected
		return (text, text_selected)

	def _set_selected(self, selected, *args, **args):
		UIItem._set_selected(self, selected, *args, **kw)
		if selected:
			pass
		self.text_sel.set_scroll(selected)

	def destroy(self):
		self._item_name = None
		self.text_sel.set_text('')
		self.text_not_sel.set_text('')
		self.text_sel.set_scroll(False)
		return UIItem.destroy(self)



]:
	i: 90(), 120(), 143(AE)
	o: 

nname: 143
n 143(None)[]:
	i: 110(f)
	o: 145(AE)

nname: 120
n 120(None)[from pygui.gui.widget import TextBlock
]:
	i: 110(t)
	o: 145()

nname: 110
n 110(<dummy_ex3> EXC_MATCH ImportError)[]:
	i: 0(except)
	o: 120(t), 143(f)

nname: 90
n 90(None)[from wyvas import TextBlock
]:
	i: 79(), 89()
	o: 145()

nname: 89
n 89(None)[]:
	i: 51(f)
	o: 90()

nname: 79
n 79(None)[raise ImportError
]:
	i: 51(t)
	o: 90()

nname: 51
n 51('cython' not in wyvas_version)[from wyvas import __version__ as wyvas_version
]:
	i: 0(try)
	o: 79(t), 89(f)

nname: 0
n 0(None)[from __future__ import absolute_import
from .ui_items import UIItem
from pygui.facilities.l10n import omnicode
]:
	i: 
	o: 51(try), 110(except)

nname: 145
n 145(None)[class TextItem(UIItem):
	__slots__ = ['_selected', '_marked', '_position', '_edited', 'widget', 'style', '_item_name', '_not_selected_widget', '_selected_widget', 'text_not_sel', 'text_sel', 'selected_style_string', 'not_selected_style_string']
	def reset(self, item, selected, position=None):
		if item is not None:
			self._item_name = item.name
			self._update_text(position)
		else:
			self._item_name = None
			self.widget.set_color(a=0)
		UIItem.reset(self, item, selected, position)
		if selected:
			pass
		self.text_sel.set_scroll(selected)
		return None

	def set_position(self, position):
		if position != self._position:
			self._position = position
			if self._item_name is not None:
				self._update_text(position)
		return None

	def _update_text(self, position):
		if position is not None and self.style['enumerated']:
			name = '%d. %s' % (position, self._item_name)
		else:
			name = omnicode(self._item_name)
		try:
			self._selected_widget.set_text(name)
			self._not_selected_widget.set_text(name)
		except:
			name = name.encode('ascii', 'replace')
			self._selected_widget.set_text(name)
			self._not_selected_widget.set_text(name)
		return None

	def _create(self):
		self._item_name = None
		style = self.style
		maxlen = style['maxlen']
		text = TextBlock(max_width=maxlen)
		text.set_color(color=style['text_color'])
		text_size = style['text_size']
		self._not_selected_kwargs.update(width=text_size[0], height=text_size[1])
		text_selected = TextBlock(max_width=maxlen)
		text_selected.set_color(color=style['selected_text_color'])
		text_size = style['selected_text_size']
		self._selected_kwargs.update(width=text_size[0], height=text_size[1])
		text_selected.set_style(style=style['selected_font_style'])
		text.set_style(style=style['font_style'])
		self.text_not_sel = text
		self.text_sel = text_selected
		return (text, text_selected)

	def _set_selected(self, selected, *args, **args):
		UIItem._set_selected(self, selected, *args, **kw)
		if selected:
			pass
		self.text_sel.set_scroll(selected)

	def destroy(self):
		self._item_name = None
		self.text_sel.set_text('')
		self.text_not_sel.set_text('')
		self.text_sel.set_scroll(False)
		return UIItem.destroy(self)



]:
	i: 90(), 110()
	o: 

nname: 110
n 110(None)[except ImportError:
	from pygui.gui.widget import TextBlock
]:
	i: 0()
	o: 145()

nname: 90
n 90(None)[from wyvas import TextBlock
]:
	i: 0()
	o: 145()

nname: 0
n 0(None)[from __future__ import absolute_import
from .ui_items import UIItem
from pygui.facilities.l10n import omnicode
try:
	from wyvas import __version__ as wyvas_version
	if 'cython' not in wyvas_version:
		raise ImportError
]:
	i: 
	o: 90(), 110()

self.nodes: {0: <unpyclib.structure.node instance at 0xb757fa2c>, 110: <unpyclib.structure.node instance at 0xb757f3ac>, 145: <unpyclib.structure.node instance at 0xb757f86c>, 90: <unpyclib.structure.node instance at 0xb757f5ec>}
from __future__ import absolute_import
from .ui_items import UIItem
from pygui.facilities.l10n import omnicode
try:
	from wyvas import __version__ as wyvas_version
	if 'cython' not in wyvas_version:
		raise ImportError
